We studied the effects of a single genetic change on a complex mammalian behavior using animals congenic for two variants of Abpa, the gene for the alpha subunit of mouse salivary androgen-binding protein (ABP), in two-way preference tests. Females exhibited a preference for investigating salivas of males of their own genetic type of ABP but not for urines of either type of male. This preference behavior is consistent for samples of mice from geographically diverse populations of Mus musculus domesticus and M. m. musculus. These findings provide an explanation for the observation that this gene is evolving under strong selection.